import { DEFAULT_LAYOUT } from '../base';
import { type AppRouteRecordRaw } from '../types';
import i18n from '@/settings/i18n';
import { IconSettings } from "@arco-design/web-vue/es/icon";

const routes: AppRouteRecordRaw = {
  path: '/system',
  redirect: '/system/homepage',
  component: DEFAULT_LAYOUT,
  meta: {
    title: i18n.global.t('settings.menu.system.title'),
    icon: IconSettings,
    order: 300,
    roles: ['admin'],
  },
  children: [
    {
      path: 'homepage/index',
      component: () => import('@/settings/views/homepage/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.system.homepage.index'),
      },
    },

    {
      path: 'general/index',
      component: () => import('@/settings/views/general/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.operator.communityInfo'),
      },
    },

    {
      path: 'people/index',
      component: () => import('@/settings/views/people/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.system.people.index'),
      },
    },

    {
      path: 'float-navigation/index',
      component: () => import('@/settings/views/float-navigation/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.system.floatNavigation.index'),
      },
    },

    {
      path: 'seo/index',
      component: () => import('@/settings/views/seo/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.operator.seo.edit'),
      },
    },

    {
      path: 'stats/index',
      component: () => import('@/settings/views/stats/index.vue'),
      meta: {
        title: i18n.global.t('settings.menu.operator.stats.index'),
      },
    },
  ],
};

export default routes;
